import '@assets/style/base.css'

import {createApp} from 'vue'


import App from './App.vue'

import naive from 'naive-ui'
import {setupRouter} from "@/router";
import {setupStore} from "@/stores";

import {setupDirectives} from '@/directive';

import 'ug-jodit-editor/style'


async function bootstrap() {
  const router = await setupRouter()
  const app = createApp(App)

  app.use(naive)
  setupStore(app) // 使用 stores/index.ts 中的 setupStore

  app.use(router)

  //注册全局自定义指令，如：v-permission权限指令
  setupDirectives(app);
  app.mount('#app')
}

void bootstrap()
